index.js ➔ mergeConfigs   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 6
dl 0
loc 11
rs 10
c 0
b 0
f 0
1
export * from 'myrmidon';
2
3
export function mergeConfigs(...configs) {
4
    const config = {};
5
6
    for (const [ conf = {} ] of configs.reverse()) {
7
        for (const key of Object.keys(conf)) {
0 ignored issues
show
Bug introduced by
The variable conf seems to be never declared. If this is a global, consider adding a /** global: conf */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
8
            config[key] = conf[key];
9
        }
10
    }
11
12
    return config;
13
}
14